/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.transas.zorlog.data.log;

import java.nio.ByteBuffer;
import java.text.NumberFormat;
import java.util.List;

/**
 * @author amalikov
 * 
 */
public class PacketAdapter {
	public PacketAdapter(PacketParser packetParser, ByteBuffer buf) {
		this.parser = packetParser;
		this.buf = buf;
	}
	
	public List<Field> getFields() {
		return parser.getFields();
	}
	
	public Double getValue(int index) {
		return parser.getValue(buf, index);
	}

	public String getValueAsString(int index, NumberFormat nf) {
		return parser.getValueAsString(buf, index, nf);
	}
	
	private PacketParser parser;
	private ByteBuffer buf;
}
